
using System;
using System.Threading.Tasks;
using Quartz;
using Topshelf.Logging;

namespace Topshelf.Demo.Jobs
{
    public class SampleJob : IJob
    {
        private readonly LogWriter _log;

        public SampleJob()
        {
            _log = HostLogger.Get<SampleJob>();
        }

        public Task Execute(IJobExecutionContext context)
        {
            _log.Info(string.Format("[{0:yyyy-MM-dd hh:mm:ss:ffffff}]Sample job is running...", DateTime.Now));
            return Task.CompletedTask;
        }
    }
}